<template>
  <div>
    <h1>修改页面</h1>
    <p>分类名称：<input type="text" v-model="name">
      <button @click="xiugai">修改</button>
    </p>
  </div>
</template>

<script>
export default {
  name: "xiugai",
  data() {
    return {
      id: this.$route.query.id,
      name: this.$route.query.name
    }
  },
  methods:{
    xiugai(){
      this.$axios.put('lianxi/add?id='+this.id+'&name='+this.name).then(res=>{
        alert('ok')
        this.$router.go(-1)
      })
    }
  }
}
</script>

<style scoped>

</style>
